"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//定义积分类
class ScorePanel {
    constructor(maxLevel = 10, upScore = 10) {
        this.score = 0; //计分
        this.level = 1; //等级
        this.scoreEle = document.getElementById('score');
        this.levelEle = document.getElementById('level');
        this.maxLevel = maxLevel;
        this.upScore = upScore;
    }
    // 设置一个加分的方法
    addScore() {
        // 让分数增加   每10分升一级
        this.scoreEle.innerHTML = String(++this.score);
        if (this.score % this.upScore === 0) {
            this.levelUP();
        }
    }
    levelUP() {
        if (this.level < this.maxLevel) {
            this.levelEle.innerHTML = String(++this.level);
        }
    }
}
const scorePanel = new ScorePanel(100, 2);
for (let index = 0; index < 200; index++) {
    scorePanel.addScore();
}
exports.default = ScorePanel;
console.log(11);
